package twentytwenty;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2020-12-12 17:57
 * @Modified By:
 */
public class IsPerfectSquare_367 {
    public static void main(String[] args) {
        int a = 16;
        System.out.println(isPerfectSquare(a));
        int temp1 = 5^8;
        System.out.println(temp1);
    }

    public static boolean isPerfectSquare(int num) {
        for (int i =((int) Math.sqrt(num)) - 1; i <= ((int) Math.sqrt(num)) + 1; i++) {
            if (i * i == num){
                return true;
            }
        }
        return false;
    }
}
